package meituan;

import java.util.Scanner;

public class Fice {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n =scan.nextInt();
        int []arr = new int[n];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = scan.nextInt();
        }
        int []b = new int[n];
        for (int i = 0; i < b.length; i++) {
            b[i] = -1;
        }
        int m = scan.nextInt();
        for (int i = 0; i < m; i++) {
            int tempa = scan.nextInt();
            if(tempa==1){
                int k = scan.nextInt();
                int x =scan.nextInt();
                int y = scan.nextInt();
                System.arraycopy(arr,x-1,b,y-1,k);
            }else{
                int x = scan.nextInt();
                System.out.println(b[x-1]);
            }
        }
    }
}
